package com.common.DAO;

import java.util.List;

import com.common.entity.Registration;

public interface IRegistrationDAO extends IBaseDAO {

	/**
	 * List 
	 * @return list de toutes les inscriptions de covoitureur a un trajet
	 */
	public List <Registration> list();
	
	public void addRegistration(Registration registration);

	/**
	 * Method used to list registration for a covoitureur by its id
	 * @param id_covoit
	 * @return
	 */
	List<Registration> listRegistrationByCovoitureurId(int id_covoit);

	/**
	 * Method used to know if a covoitureur is registered to a path
	 * @param id_covoitureur
	 * @param id_path
	 * @return
	 */
	public boolean isCovoitureurRegisterForPath(int id_covoitureur, int id_path);

	/**
	 * Method used to remove a covoitureur to a path
	 * @param registration
	 */
	public void removeRegistration(Registration registration);

	List<Registration> listRegistrationByPathId(int id_path);
}
